/*
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package net.javlov.vf;

import java.util.Collection;
import java.util.List;

import net.javlov.Option;

/**
 * Stores option values for a state.
 * 
 * @author Matthijs Snel
 *
 */
public interface OptionValues {

	/**
	 * 
	 * @param o the option
	 * @return the value of o
	 */
	double get(Option<?> o);

	/**
	 * 
	 * @param o the option
	 * @param delta the value by which to update o
	 */
	void update(Option<?> o, double delta);

	/**
	 * 
	 * @return the list of options for which the value is equal to 
	 * the maximum option value for this state
	 */
	List<? extends Option<?>> getMaxOptions();

	/**
	 * 
	 * @return all eligible options for this state
	 */
	List<? extends Option<?>> getOptions();

	/**
	 * 
	 * @return the values of all eligible options for this state; zeros
	 * for unknown values
	 */
	Collection<Value> getValues();

	/**
	 * 
	 * @return the number of eligible options
	 */
	int size();

	/**
	 * 
	 * @return the current maximum option value
	 */
	double max();

}